package com.hw.paltfrom.controller.doncutor;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.hw.paltfrom.pack.ResponseResult;
import com.hw.paltfrom.rescode.HWSystemCode;
import com.hw.paltfrom.service.doncutor.DataQueryServer;
import com.hw.paltfrom.utils.VerifyUtil;
import com.hw.paltfrom.vo.DataQueryVo;
import com.hw.paltfrom.vo.FindRoundVo;

@RestController
@RequestMapping(value = "/DataQuery")
public class DataQueryController {

	 @Autowired
	    private DataQueryServer dataQueryServer;
	 
	 @RequestMapping(value = "/query")
	    public Map<String, Object> standQuery(DataQueryVo  vo) {
	        Boolean flag = VerifyUtil.verifyParams(vo);
	        if (!flag) {
	            return ResponseResult.fail(HWSystemCode.PARAMS_ERROR);
	        }
	        return dataQueryServer.queryTask(vo);
	    }
	 
	 
	 @RequestMapping(value = "/findRound")
	    public Map<String, Object> findRound(FindRoundVo  vo) {
	        Boolean flag = VerifyUtil.verifyParams(vo);
	        if (!flag) {
	            return ResponseResult.fail(HWSystemCode.PARAMS_ERROR);
	        }
	        return dataQueryServer.findRound(vo);
	    }
}
